@import url("https://fonts.googleapis.com/css2?family=Creepster&family=Noto+Sans+SC:wght@300;400;500;700&display=swap");

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS 变量定义 */
:root {
  --primary-bg: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
  --text-primary: #d0d0d0;
  --text-secondary: #a0a0a0;
  --text-accent: #ff8c00;
  --border-color: #333;
  --card-bg: rgba(0, 0, 0, 0.6);
  --card-border: rgba(255, 255, 255, 0.1);
  --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: "Noto Sans SC", sans-serif;
  --font-display: "Creepster", cursive;
}

/* 全局样式 */
body {
  font-family: var(--font-primary);
  background: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景效果 */
.cemetery-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at 10% 30%,
      rgba(139, 69, 19, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 90% 70%,
      rgba(75, 0, 130, 0.12) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 50% 90%,
      rgba(40, 40, 40, 0.2) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  z-index: -3;
}

.cemetery-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 15% 25%,
      rgba(255, 140, 0, 0.02) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(255, 140, 0, 0.02) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 50% 10%,
      rgba(255, 140, 0, 0.015) 0%,
      transparent 25%
    );
  animation: candleFlicker 4s ease-in-out infinite alternate;
}

/* 雾气效果 */
.fog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at top,
      rgba(255, 255, 255, 0.02) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse at bottom,
      rgba(128, 128, 128, 0.03) 0%,
      transparent 70%
    );
  z-index: -1;
  animation: drift 20s ease-in-out infinite alternate;
}

/* 星空效果 */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.15;
  animation: twinkle 4s infinite alternate;
}

/* 动画定义 */
@keyframes drift {
  0% {
    transform: translateX(-2px) translateY(-2px);
  }
  100% {
    transform: translateX(2px) translateY(2px);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.05;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
}

@keyframes candleFlicker {
  0% {
    opacity: 0.8;
  }
  25% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.7;
  }
  75% {
    opacity: 0.95;
  }
  100% {
    opacity: 0.85;
  }
}

@keyframes sway {
  0% {
    transform: translateY(-50%) rotate(-1deg);
  }
  100% {
    transform: translateY(-50%) rotate(1deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* 通用组件样式 */
.btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-family: var(--font-primary);
}

.btn:hover {
  background: rgba(255, 140, 0, 0.1);
  border-color: var(--text-accent);
  color: var(--text-accent);
}

.btn.active {
  background: var(--text-accent);
  color: #000;
  border-color: var(--text-accent);
}

/* 卡片样式 */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 140, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .card {
    padding: 15px;
  }
  
  .btn {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 140, 0, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 140, 0, 0.7);
}